import request from '@/utils/request'

export function fetchCommentPage(params) {
  return request({ url: '/admin/comment/page', method: 'get', params })
}

export function getCommentById(id) {
  return request({ url: `/admin/comment/${id}`, method: 'get' })
}

export function createComment(data) {
  return request({ url: '/admin/comment', method: 'post', data })
}

export function updateComment(data) {
  return request({ url: '/admin/comment', method: 'put', data })
}

export function deleteComment(id) {
  return request({ url: `/admin/comment/${id}`, method: 'delete' })
}

export function deleteCommentBatch(ids) {
  return request({ url: '/admin/comment/batch', method: 'delete', data: ids })
}